package com.feib.stms.service;

import org.springframework.transaction.annotation.Transactional;

import com.feib.stms.model.MailQueue;

@Transactional(readOnly = true)
public interface MailQueueService {
    
    /**
     * 依據主鍵取得MailQueue物件
     * @param mailQueuePk
     * @return
     */
    public MailQueue queryByPk(Long mailQueuePk);
    
    /**
     * 取得尚未發送MailQueue物件
     * @return null 無待送郵件
     */
    public MailQueue getUnSendMail();

    @Transactional(readOnly = false)
    public int updateMailStatus(MailQueue mailQueue);

}

